The following command line applications are distributed with OSSIM.
ossim-info Used to run ossim utilities function and to display metadata for imagery, maps, terrain, and vector data.
The following tools are used to create OSSIM support files:
ossim-img2rr Create reduced resolution data sets for an image.ossim-cmm Determine the min/max pixel values of an image.ossim-create-histo Compute a histogram for an image.ossim-img2md Create meta data files.ossim-tfw2ogeom Create a geom file from a TIFF World File.ossim-extract-vertices Compute the valid vertices (corners) of an image.ossim-preproc Create reduced resolution data sets, histograms, and so on. Application does directory walking and is threaded at a file level.ossim-applanix2ogeom Create a geom file for Applanix Images.ossim-create-cg Create an ossim coarse grid.ossim-ecg2ocg Convert an enhanced coarse grid to an ossim coarse grid.ossim-band-merge Merge multiple image files into a single n-band dataset.ossim-chipper Render elevation data (e.g. shaded relief).ossim-icp Convert an image from one format to another.ossim-igen Execute image chains specified in a spec file.ossim-orthoigen Tool to orthorectify, mosaic, and convert raster data between different formats. It provides a number of operations including subsetting, resampling, histogram matching, and reprojection of data.ossim-rpf Various utilities for managing RPF data.
In [ ]:
    
from IPython.core.display import Image
    
In [ ]:
    
DATADIR='/home/main/notebooks/data/landsat/'
    
In [ ]:
    
# we'll use the north_carolina image dataset
!ls {DATADIR} | grep tif
    
In [ ]:
    
!ossim-info
    
In [ ]:
    
!ossim-info --deg2rad 20.54
    
In [ ]:
    
!ossim-info --rad2deg 0.35849
    
In [ ]:
    
!ossim-info --ft2mtrs 1
    
0.3048006096 meters per foot
ossim-info --ft2mtrs-us-survey <feet>
In [ ]:
    
!ossim-info --ft2mtrs-us-survey 1
    
In [ ]:
    
!ossim-info --mtrs2ft 1
    
0.3048006096 meters per foot
ossim-info --mtrs2ft-us-survey  <meters>
In [ ]:
    
!ossim-info --mtrs2ft-us-survey  1
    
In [ ]:
    
# note we pass the path to the ossim_preference file to tell where the geoid file is
!ossim-info --height 47.54 157.40 -P /usr/local/share/ossim/ossim_preference
    
In [ ]:
    
!ossim-info --mtrsPerDeg 65.45
    
In [ ]:
    
!ossim-info --datums
    
In [ ]:
    
!ossim-info --projections
    
In [ ]:
    
!ossim-info --cg {DATADIR}/p011r031_7t19990918_z19_nn10.tif -P /usr/local/share/ossim/ossim_preference
    
In [ ]:
    
!ossim-info  --ci {DATADIR}/p011r031_7t19990918_z19_nn10.tif -P /usr/local/share/ossim/ossim_preference
    
In [ ]:
    
!ossim-info  -c {DATADIR}/p011r031_7t19990918_z19_nn10.tif -P /usr/local/share/ossim/ossim_preference
    
In [ ]:
    
!ossim-info  -i {DATADIR}/p011r031_7t19990918_z19_nn10.tif -P /usr/local/share/ossim/ossim_preference
    
In [ ]:
    
!ossim-info  -m {DATADIR}/p011r031_7t19990918_z19_nn10.tif -P /usr/local/share/ossim/ossim_preference
    
In [ ]:
    
!ossim-info  -p {DATADIR}/p011r031_7t19990918_z19_nn10.tif -P /usr/local/share/ossim/ossim_preference
    
In [ ]:
    
!ossim-info  -r {DATADIR}/p011r031_7t19990918_z19_nn10.tif -P /usr/local/share/ossim/ossim_preference
    
In [ ]:
    
!ossim-img2rr {DATADIR}/p011r031_7t19990918_z19_nn10.tif -P /usr/local/share/ossim/ossim_preference
    
In [ ]:
    
!ossim-img2rr {DATADIR}/p011r031_7t19990918_z19_nn20.tif -P /usr/local/share/ossim/ossim_preference
    
In [ ]:
    
!ossim-img2rr {DATADIR}/p011r031_7t19990918_z19_nn30.tif -P /usr/local/share/ossim/ossim_preference
    
In [ ]:
    
!ossim-cmm {DATADIR}/p011r031_7t19990918_z19_nn10.tif -P /usr/local/share/ossim/ossim_preference
    
In [ ]:
    
!ossim-cmm {DATADIR}/p011r031_7t19990918_z19_nn20.tif -P /usr/local/share/ossim/ossim_preference
    
In [ ]:
    
!ossim-cmm {DATADIR}/p011r031_7t19990918_z19_nn30.tif -P /usr/local/share/ossim/ossim_preference
    
In [ ]:
    
!cat /home/main/notebooks/data/landsat/p011r031_7t19990918_z19_nn10.omd
    
In [ ]:
    
!ossim-img2md -P /usr/local/share/ossim/ossim_preference tiff_world_file {DATADIR}/p011r031_7t19990918_z19_nn10.tif {DATADIR}/p011r031_7t19990918_z19_nn10.tfw
    
In [ ]:
    
!cat /home/main/notebooks/data/landsat//p011r031_7t19990918_z19_nn10.tfw
    
Example, crete an RGB image from the single-band grayscale r,g,b images (Landsat 7)
In [ ]:
    
!ossim-band-merge jpeg -P /usr/local/share/ossim/ossim_preference \
                 {DATADIR}/p011r031_7t19990918_z19_nn30.tif \
                 {DATADIR}/p011r031_7t19990918_z19_nn20.tif \
                 {DATADIR}/p011r031_7t19990918_z19_nn10.tif \
                 rgb.jpeg
    
In [ ]:
    
!ossim-cmm rgb.jpeg -P /usr/local/share/ossim/ossim_preference
    
In [ ]:
    
!cat rgb.omd
    
In [ ]:
    
Image("rgb.jpeg")
    
In [ ]:
    
!ossim-create-histo {DATADIR}/p011r031_7t19990918_z19_nn30.tif \
{DATADIR}/p011r031_7t19990918_z19_nn20.tif \
{DATADIR}/p011r031_7t19990918_z19_nn10.tif
    
In [ ]:
    
!ossim-orthoigen --hist-auto-minmax {DATADIR}/p011r031_7t19990918_z19_nn30.tif {DATADIR}/p011r031_7t19990918_z19_nn30_histmm.tif -P /usr/local/share/ossim/ossim_preference
!ossim-orthoigen --hist-auto-minmax {DATADIR}/p011r031_7t19990918_z19_nn20.tif {DATADIR}/p011r031_7t19990918_z19_nn20_histmm.tif -P /usr/local/share/ossim/ossim_preference
!ossim-orthoigen --hist-auto-minmax {DATADIR}/p011r031_7t19990918_z19_nn10.tif {DATADIR}/p011r031_7t19990918_z19_nn10_histmm.tif -P /usr/local/share/ossim/ossim_preference
    
In [ ]:
    
!ossim-band-merge jpeg -P /usr/local/share/ossim/ossim_preference \
                 {DATADIR}/p011r031_7t19990918_z19_nn30_histmm.tif \
                 {DATADIR}/p011r031_7t19990918_z19_nn20_histmm.tif \
                 {DATADIR}/p011r031_7t19990918_z19_nn10_histmm.tif \
                 rgb_histmm.jpeg
    
In [ ]:
    
Image('rgb_histmm.jpeg')
    
In [ ]:
    
!ossim-chipper --color 255 255 255 \
              --azimuth 270 \
              --elevation 45 \
              --exaggeration 2.0 \
              --op hillshade \
              --color-table {DATADIR}/ossim-dem-color-table-template.kwl \
              --input-dem {DATADIR}/SRTM_fB03_p011r031.tif \
              hillshade.jpg -P /usr/local/share/ossim/ossim_preference
    
In [ ]:
    
!ossim-info {DATADIR}/SRTM_fB03_p011r031.tif -P /usr/local/share/ossim/ossim_preference
    
In [ ]:
    
!gdalinfo {DATADIR}/SRTM_fB03_p011r031.tif
    
In [ ]:
    
Image('hillshade.jpg')
    
In [ ]:
    
# A complete list of ossim writers (driver) is given by:
!ossim-info --writers -P /usr/local/share/ossim/ossim_preference
    
In [ ]:
    
#convert a geotiff to a geopdf
!ossim-icp ossim_pdf rgb_histmm.jpeg rgb_histmm.pdf
    
In [ ]:
    
#view the results in a pdf viewer
#nohup evince lsat7_2002_30.pdf &
    
ossim-igenExecute image chains specified in a spec file.
In the folowing example the spec file rgb.spec has been generated using  imagelinker, from an example session: /home/user/ossim/ossim-rgb.prj
In [ ]:
    
#ossim-igen /home/user/ossim/rgb.spec
    
In [ ]:
    
#display < /home/user/rgb.jpg